package main

import (
	"project2/db"
	"project2/utils/redis"
	_ "project2/utils/redis"
)

func main() {
	db.InitDb()

	//	新增
	//data := model.Test{
	//	Name: "我是你爸爸",
	//}
	//g.Db.Create(&data)
	//fmt.Println(data)

	//修改
	//g.Db.Model(&model.Test{}).Where("id = ?", 5).Update("name", "我是你的爸爸123")

	//删除
	//g.Db.Delete(&model.Test{}, 5)
	//查询
	//var testlist []model.Test
	//g.Db.Model(&model.Test{}).Where("id  = ?", 1).Find(&testlist)

	//var testOne model.Test
	//g.Db.Model(&model.Test{}).Where("id  = ?", 1).First(&testOne)
	//
	//fmt.Println(1)
	redis.Redisset("a", "w shi ni baba ")
	var a = redis.Redisget("a")
	print(a)
}
